<!DOCtype html>
<html>
<head>
  <meta charset="UTF-8">
  <title>peas</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body>
  <!-- route container -->
  <div data-ng-view id="view"></div>

  <script src="components/seajs/dist/sea.js"></script>
  <script src="components/seajs/dist/seajs-css.js"></script>
  <script src="components/seajs/dist/seajs-text.js"></script>
  <script src="components/angular/angular.js""></script>
  <!--less dev-->  
  <link rel="stylesheet/less" type="text/css" href="resource/css/all.less" />
  <script src="components/less/less.js""></script>
  <!--less dev-->
  <script>
    //var domain = 'http://127.0.0.1:8888/demo/app/';
    var domain;
    
    if (location.href.indexOf("?dev") > 0) {
         domain = 'http://www.peas-angular.com:8888/';
    } else {
         domain = 'http://www.peas-angular.com:8888/';
    }

    seajs.config({
          alias: {
                "angular-route" : "components/angular-route/angular-route.js",
                "angular-lazyload" : "components/angular-lazyload/angular-lazyload.js",
                "angular-cookies" : "components/angular-cookies/angular-cookies.js",
                "angular-resource" : "components/angular-resource/angular-resource.js",
                "underscore" : "components/underscore/angular-underscore.js",
                "lang" : "components/I18N/en_service.js"
          },

          preload: [],

          paths: {},

          vars: {
                'resource': domain+'resource/',
                'apiUrl': domain+'api/'
                //'apiAccessUrl': domain+'/apis/'+getCookie('session_id')+'/'
          },

          'map': [
                  [/^(.*\.(?:css|js))(.*)$/i, '$1?v='+Math.random()]
                  //[/^(.*\.(?:css|js))(.*)$/i, '$1?v=1.0']
          ],
                 
          debug: true,
              
          base: domain,
              
          charset: 'utf-8'
    });
            
    //入口尽量简单 app依赖angularjs,angularjs必须先载入,app,需要载入CSS等文件，seajs插件也必须先载入
    seajs.use(['./app'],function(ng,app){
        window.onload = function(){
          angular.bootstrap(document, ['app']);
        }
    })

  </script>
</body>
</html>
